﻿using Domain.Entity;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EfCore.Configers
{
    public class MCConfigers : IEntityTypeConfiguration<MC>
    {
        public void Configure(EntityTypeBuilder<MC> builder)
        {
            builder.ToTable(nameof(MC));

            builder.HasKey(e => e.MchId);

            builder.Property(e => e.MchId).ValueGeneratedOnAdd();

            builder.Property(e => e.FirstKindName).HasMaxLength(50);
            builder.Property(e => e.SecondKindName).HasMaxLength(50);
            builder.Property(e => e.ThirdKindName).HasMaxLength(50);
            builder.Property(e => e.MajorKindName).HasMaxLength(50);
            builder.Property(e => e.MajorName).HasMaxLength(50);
            builder.Property(e => e.NewFirstKindName).HasMaxLength(50);
            builder.Property(e => e.NewSecondKindName).HasMaxLength(50);
            builder.Property(e => e.NewThirdkindName).HasMaxLength(50);
            builder.Property(e => e.NewMajorKindName).HasMaxLength(50);
            builder.Property(e => e.NewMajorName).HasMaxLength(50);
            builder.Property(e => e.HumanName).HasMaxLength(50);
            builder.Property(e => e.SalaryStandardName).HasMaxLength(100);
            builder.Property(e => e.NewSalaryStandardName).HasMaxLength(100);
            builder.Property(e => e.ChangeReason).HasMaxLength(500);
            builder.Property(e => e.CheckReason).HasMaxLength(500);
            builder.Property(e => e.CheckStatus).HasMaxLength(20);
            builder.Property(e => e.Register).HasMaxLength(50);
            builder.Property(e => e.Checker).HasMaxLength(50);
        }
    }

}
